All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface javax.servlet.http.HttpServletRequest

public interface HttpServletRequest
extends ServletRequest
This interface represents an HTTP servlet request. It gets data from the client to the servlet for use in the service method. It allows the HTTP-protocol specified header information to be accessed from the service method.


Method Index

 o getAuthType()
Returns the authentication scheme of the request, or null if none.
 o getDateHeader(String)
Returns the value of a date header field, or -1 if not found.
 o getHeader(String)
Returns the value of a header field, or null if not known.
 o getHeaderNames()
Returns an enumeration of strings representing the header names for this request.
 o getIntHeader(String)
Returns the value of an integer header field, or -1 if not found.
 o getMethod()
Returns the method with which the request was made.
 o getPathInfo()
Returns optional extra path information following the servlet path, but immediately preceding the query string.
 o getPathTranslated()
Returns extra path information translated to a real path.
 o getQueryString()
Returns the query string part of the servlet URI, or null if none.
 o getRemoteUser()
Returns the name of the user making this request, or null if not known.
 o getRequestURI()
Returns the request URI as a URL object.
 o getServletPath()
Returns the part of the request URI that refers to the servlet being invoked.

Methods

 o getMethod
 public abstract String getMethod()
Returns the method with which the request was made. The returned value can be "GET", "HEAD", "POST", or an extension method. Same as the CGI variable REQUEST_METHOD.

 o getRequestURI
 public abstract String getRequestURI()
Returns the request URI as a URL object.

 o getServletPath
 public abstract String getServletPath()
Returns the part of the request URI that refers to the servlet being invoked. Analogous to the CGI variable SCRIPT_NAME.

 o getPathInfo
 public abstract String getPathInfo()
Returns optional extra path information following the servlet path, but immediately preceding the query string. Returns null if not specified. Same as the CGI variable PATH_INFO.

 o getPathTranslated
 public abstract String getPathTranslated()
Returns extra path information translated to a real path. Returns null if no extra path information specified. Same as the CGI variable PATH_TRANSLATED.

 o getQueryString
 public abstract String getQueryString()
Returns the query string part of the servlet URI, or null if none. Same as the CGI variable QUERY_STRING.

 o getRemoteUser
 public abstract String getRemoteUser()
Returns the name of the user making this request, or null if not known. The user name is set with HTTP authentication. Whether the user name will continue to be sent with each subsequent communication is browser-dependent. Same as the CGI variable REMOTE_USER.

 o getAuthType
 public abstract String getAuthType()
Returns the authentication scheme of the request, or null if none. Same as the CGI variable AUTH_TYPE.

 o getHeader
 public abstract String getHeader(String name)
Returns the value of a header field, or null if not known. The case of the header field name is ignored.

Parameters:
name - the case-insensitive header field name
 o getIntHeader
 public abstract int getIntHeader(String name)
Returns the value of an integer header field, or -1 if not found. The case of the header field name is ignored.

Parameters:
name - the case-insensitive header field name
 o getDateHeader
 public abstract long getDateHeader(String name)
Returns the value of a date header field, or -1 if not found. The case of the header field name is ignored.

Parameters:
name - the case-insensitive header field name
 o getHeaderNames
 public abstract Enumeration getHeaderNames()
Returns an enumeration of strings representing the header names for this request. Some server implementations do not allow headers to be accessed in this way, in which case this method will return null.


All Packages  Class Hierarchy  This Package  Previous  Next  Index